<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.2</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script type="text/javascript" src="./js/jquery.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form">
            <div class="layui-form-item">
                <label for="username" class="layui-form-label">
                    <span class="x-red"></span>姓名：
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="userName" name="username" required="" lay-verify="required"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>

            <div class="layui-form-item">
                <label for="userSex" class="layui-form-label">
                    <span class="x-red"></span>性别：
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="userSex" name="userSex" required="" lay-verify="phone"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>

            <div class="layui-form-item">
                <label for="userIdentityCard" class="layui-form-label">
                    <span class="x-red"></span>身份证号：
                </label>
                <div class="layui-input-inline">
                    <input type="password" id="userIdentityCard"  required="" lay-verify="email"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>

            <div class="layui-form-item">
                <label for="userPhone" class="layui-form-label">
                    <span class="x-red"></span>手机号码：
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="userPhone" name="pass" required="" lay-verify="pass"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>

            <div class="layui-form-item">
                <label for="userNation" class="layui-form-label">
                    <span class="x-red"></span>民族：
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="userNation" name="pass" required="" lay-verify="pass"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>

            <div class="layui-form-item">
                <label for="accountId" class="layui-form-label">
                    <span class="x-red"></span>账号：
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="accountId" name="pass" required="" lay-verify="pass"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-form-item">
                <label for="userPassword" class="layui-form-label">
                    <span class="x-red"></span>密码：
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="userPassword" name="pass" required="" lay-verify="pass"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-form-item">
                <label for="userWeChatHead" class="layui-form-label">
                    <span class="x-red"></span>微信头像：
                </label>
                <div class="layui-input-inline">
                    <input type="image" id="userWeChatHead" name="pass" required="" lay-verify="pass"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>

            <div class="layui-form-item">
                <label for="userCreatTime" class="layui-form-label">
                    <span class="x-red"></span>创建时间：
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="userCreatTime" name="pass" required="" lay-verify="pass"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-form-item">
                <label for="userModifiTime" class="layui-form-label">
                    <span class="x-red"></span>更新时间：
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="userModifiTime" name="pass" required="" lay-verify="pass"
                           autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-form-item">
            </div>
        </form>
    </div>
</div>
<script>
    $(function(){
        var category=window.location.search;
        var id=category.substring(category.lastIndexOf("=")+1,category.length);

        $.ajax({
            type:"GET",
            url:"/hospital/api/back/user/select",
            data:{"id":id},
            dataType:"json",
            success:function(data){
                console.log(data);

                $("#userName").val(data.data.userName)
                $("#userSex").val(data.data.userSex)
                $("#userIdentityCard").val(data.data.userIdentityCard)
                $("#userPhone").val(data.data.userPhone)
                $("#userNation").val(data.data.userNation)
                $("#accountId").val(data.data.accountId)
                $("#userPassword").val(data.data.userPassword)
                $("#userCreatTime").val(data.data.userCreatTime)
                $("#userModifiTime").val(data.data.userModifiTime)
            }
        })
    })


</script>
</body>

</html>
